package o.mrs;

import org.json.JSONArray;
import org.json.JSONObject;

public class EncounterType {
	
public String[] encounter(){
	
		 String[] uuidEncounter;
				//OBTIENE UUIDENCOUNTERTYPE
		 		String obj;
				try {
					obj = ApiRest.getRequestGet("encountertype");
					JSONObject jsonObject = new JSONObject(obj);
			     	JSONArray arrayResult = (JSONArray) jsonObject.get("results");    				     	
			     	uuidEncounter = new  String[arrayResult.length()];
			     	
			     	for(int contador=0; contador < arrayResult.length(); contador ++){
			     		JSONObject registro = (JSONObject) arrayResult.get(contador);
			     		String uuid = (String) registro.get("uuid");  	     					     						     		
			     		uuidEncounter[contador] = uuid;
     			     	
			     	}
			     	return uuidEncounter;
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
					return null;
				}								
}
	


}
